# -*- coding: utf-8 -*-
# Scrapy settings for dirbot project

SPIDER_MODULES = ['dirbot.spiders']
NEWSPIDER_MODULE = 'dirbot.spiders'
DEFAULT_ITEM_CLASS = 'dirbot.items.Website'

ITEM_PIPELINES = ['demo.pipelines.MyImagesPipeline']  # ImagePipeline的自定义实现类
IMAGES_STORE = '/Users/mill/PycharmProjects/python_scrapy/dirbot'   # 图片存储路径
IMAGES_EXPIRES = 90                                   # 过期天数
IMAGES_MIN_HEIGHT = 500                               # 图片的最小高度
IMAGES_MIN_WIDTH = 500                                # 图片的最小宽度
# 图片的尺寸小于IMAGES_MIN_WIDTH*IMAGES_MIN_HEIGHT的图片都会被过滤

ITEM_PIPELINES = {
                  'scrapy.contrib.pipeline.images.ImagesPipeline':2}
